﻿<UserControl x:Class="Milestone.Presentation.Tasks.AddNewExecutedTaskLayout"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:markup="http://schemas.topics.it/wpf/radical/windows/markup"
             xmlns:behaviors="http://schemas.topics.it/wpf/radical/windows/behaviors"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel>
        <StackPanel Orientation="Horizontal">
            <Image Source="{Binding Path=Icon}" Stretch="Uniform" Width="16" Margin="2" />

            <TextBlock Margin="2,0,0,0" VerticalAlignment="Center"
                       Text="{Binding Path=DisplayName}" 
                       ToolTip="{Binding Path=Description}"
                       TextTrimming="CharacterEllipsis" />

        </StackPanel>
        <!--<DatePicker SelectedDate="{markup:EditorBinding Path=ExecutionDate}" />
        <TextBox Text="{markup:EditorBinding Path=Duration}" behaviors:CueBannerService.CueBanner="Duration..." />-->
        <TextBox behaviors:AutoComplete.UserText="{markup:EditorBinding Path=UserText}"
				 behaviors:AutoComplete.Source="{Binding Path=Data}"
                 behaviors:AutoComplete.ImplicitItemsFilter="Disabled"
				 behaviors:AutoComplete.ChoosenItem="{markup:ChoosenItemBinding Path=Choosen}"
				 VerticalAlignment="Top">
            <behaviors:AutoComplete.ItemTemplate>
                <DataTemplate>
                        <TextBlock Text="{Binding Path=DisplayName}" />
                </DataTemplate>
            </behaviors:AutoComplete.ItemTemplate>
        </TextBox>

        <TextBlock TextAlignment="Right">
            <Hyperlink Command="{markup:AutoCommandBinding Path=Execute}">
                <TextBlock Text="Add..." />
            </Hyperlink>
        </TextBlock>
    </StackPanel>
</UserControl>
